Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use Docker's inspect API to get resource information #1018

Merged
merged 4 commits into from
Oct 10, 2023

Conversation

HofmeisterAn
Copy link
Collaborator

@HofmeisterAn HofmeisterAn commented Oct 9, 2023

What does this PR do?

The pull request replaces the list resource API calls with the inspect API call.

Why is it important?

This simplifies the internal Testcontainers' API. In addition, it reduces the number of operations and might result in slight performance improvements. Furthermore, the pull image policy callback will contain additional information to determine whether Testcontainers should pull an image or not.

The container and image builder members WithImagePullPolicy and WithImageBuildPolicy received a callback argument of type ImagesListResponse. We updated these callbacks, they will now receive an argument of type ImageInspectResponse. This change has been made to provide more detailed information about the actual cached image.

Related issues

-

Follow-ups

Testcontainers currently pre-pulls images before building an image from a Dockerfile. Right now, Testcontainers always attempts to pull base images, even if they already exist on the Docker host. After this pull request, we will be able to skip pre-pulling images for those that already exist locally.

@HofmeisterAn HofmeisterAn added enhancement New feature or request breaking change Causing compatibility issues labels Oct 9, 2023
@netlify
Copy link

netlify bot commented Oct 9, 2023

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit b0b0acb
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/65258b2daf99d70008ed43af
😎 Deploy Preview https://deploy-preview-1018--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@HofmeisterAn HofmeisterAn marked this pull request as ready for review October 10, 2023 17:50
@HofmeisterAn HofmeisterAn merged commit 4c7ffde into develop Oct 10, 2023
@HofmeisterAn HofmeisterAn deleted the feature/refactor-operation-apis branch October 10, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Causing compatibility issues enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant